import request from '@/utils/request'
export const getDepaetmentListAPI = () => {
  return request({
    url: '/company/department',
    method: 'get'
  })
}
// 获取负责人列表
export const getManagerListAPI = () => {
  return request({
    url: '/sys/user/simple',
    method: 'get'
  })
}

// 新增部门
export const addDepartmentAPI = (data) => {
  return request({
    url: '/company/department',
    method: 'POST',
    data
  })
}
// 获取部门详情
export const getDepartmentDetailAPI = (id) => {
  return request({
    url: `/company/department/${id}`,
    method: 'GET'
  })
}
// 编辑部门
export const editDepartmentAPI = (data) => {
  return request({
    url: `/company/department/${data.id}`,
    method: 'PUT',
    data
  })
}

// 删除部门
export const delDepartmentAPI = (id) => {
  return request({
    url: `/company/department/${id}`,
    method: 'DELETE'
  })
}
